package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    运输成本
 */
public class Ex3_18 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("输入: ");
        double w = input.nextDouble();
        if (w > 0 && w <= 1) {
            System.out.println(3.5);
        } else if (w <= 3) {
            System.out.println(5.5);
        } else if (w <= 10) {
            System.out.println(8.5);
        } else if (w <= 20) {
            System.out.println(10.5);
        } else {
            System.out.println("the package cannot be shipped");
        }
    }
}
